/*
 * Powered By XY
 * Since 2020
 */

package com.xy.biz.mes.dao;

import com.xy.biz.mes.domain.po.ManufactureTaskGoodsPO;
import com.xy.biz.mes.domain.query.ManufactureTaskGoodsQuery;
import com.xy.lang.domain.tuples.Pair;

import java.util.Collection;
import java.util.List;
import java.util.Set;

/**
 *
 *
 * @author zsp
 * @date 2022-1-6
 */
public interface ManufactureTaskGoodsDao {

	/**
	 * 保存
	 *
	 * @param manufactureTaskGoodsPO
	 */
	int saveManufactureTaskGoods(ManufactureTaskGoodsPO manufactureTaskGoodsPO);

	/**
	 * 保存多个
	 *
	 * @param collection
	 */
	int saveAllManufactureTaskGoods(Collection<ManufactureTaskGoodsPO> collection);

	/**
	 * 更新
	 *
	 * @param collection
	 */
	int updateAllManufactureTaskGoods(Collection<ManufactureTaskGoodsPO> collection);
	int updateAllManufactureTaskGoodsResult(Collection<Pair<ManufactureTaskGoodsPO, Set<Integer>>> collection);
	int updateManufactureTaskGoodsByTaskId(ManufactureTaskGoodsPO manufactureTaskGoodsPO);

	/**
	 * 删除
	 *
	 * @param
	 */
	int deleteManufactureTaskGoods(Collection<Long> collection);
	int deleteManufactureTaskGoodsByTaskId(Long manufactureTaskId);

	/**
	 * 查找一个
	 *
	 * @param manufactureTaskGoodsId
	 * @return
	 */
	ManufactureTaskGoodsPO getManufactureTaskGoods(Long manufactureTaskGoodsId);

	/**
	 * 查找多条
	 *
	 * @param collection
	 * @return
	 */
	List<ManufactureTaskGoodsPO> listManufactureTaskGoodsById(Collection<Long> collection);
	List<ManufactureTaskGoodsPO> listManufactureTaskGoods(ManufactureTaskGoodsQuery query);

	int countManufactureTaskGoods(ManufactureTaskGoodsQuery query);

}
